import { WeaTableEditable, WeaLocaleProvider } from 'ecCom';
import { WeaBrowser } from 'ecCom';
import { observer } from 'mobx-react';
import * as React from 'react';
import Dialog from '.';
const getLabel = WeaLocaleProvider.getLabel;

@observer
export default class AddFixphareDialog extends React.Component {
    render() {
        const { store } = this.props;
        const titleLabel = getLabel('520405','固定解析维护')
        return (
            <Dialog title={titleLabel} ecId={`${this && this.props && this.props.ecId || ''}_Dialog@b0vx81`} dialog={store}>
                <WeaTableEditable ecId={`${this && this.props && this.props.ecId || ''}_WeaTableEditable@tpvz72`}
                    draggable={true}
                    title={getLabel('511874','固定解析设置')}
                    showCopy={false}
                    columns={store.columns}
                    datas={store.datas.slice()}
                    onChange={store.onChange}
                    willAdd={(datas, addData) => store.befordAdd(datas, addData)}
                    tableProps={{
                        scroll: { y: 200 }
                    }}
                    rowKey="randomkey"
                />
                <WeaBrowser ecId={`${this && this.props && this.props.ecId || ''}_WeaBrowser@xdc0zj`}
                    hasAdvanceSerach={true}
                    ref={(ref) => store.browserInstance = ref}
                    inputStyle={{ display: 'none' }}
                    onChange={store.changeValue}
                    dataParams={store.dataParams}
                    destDataParams={store.dataParams}
                    replaceDatas={store.browserDatas.slice()}
                    memorise={true}
                    type={store.browserType}
                    title={store.browserTitile}
                    isMultCheckbox={store.isMultCheckbox}
                    iconBgcolor={"#217346"}
                    isSingle={false}
                    {...store.tabs}
                />
            </Dialog>
        )
    }

}